package com.application.util;


import com.application.domain.Leader;
import com.application.domain.Community;
import com.application.service.LeaderService;
import org.apache.ibatis.annotations.Result;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;

//   用于一些普通方法
public class CommonUtils {
    @Resource
    private LeaderService leaderService;



    public  int updateByOpenid_Leader(Community Community, String openid){
        if(Community.getName()!=null || Community.getTel()!=null){
            Leader leader= new Leader();
            leader.setName(Community.getName());
            leader.setTel(Community.getTel());
//            leader.setOpenid(openid);
            return leaderService.updateByOpenid(leader,openid);
        }

        return 0;
    }
}
